﻿using System;
using System.Collections.Generic;
using System.Text;


namespace QuestLib_TestCode
{
    using VOID = IEnumerator<QuestLib.ICondition>;


    public class MyQuest : Quest
    {

        static public QuestLib.REQUEST _QUESTID = QuestLib.REQUEST.CLICKNPC;

        public override VOID Run()
        {


            yield return WaitSendDialog("15 번 npc 를 만나보게");

            if (Ret() == 0)
            {
                WaitSendDialog("생각보다 성격이 이상하군!");

                yield break;
            }

            
            


            while (true)
            {

                yield return WaitClickNpc(15);



                yield return WaitSendDialog("당신이 곧 온다던 그놈인가?");

                if( Ret() == 1)
                {
                    WaitSendDialog("수고했네 그럼이만");

                    yield break;
                }
            }

            yield break;
            
        }

        //public override VOID OnRun()
        //{
        //    yield return WaitClickNpc(12);

        //    yield return SendDialog(12);

        //    if (Ret() == 0)
        //    {
        //        yield break;
        //    }

        //    yield return GiveItem(11);

        //    yield return Next(OnEnd);
        //}

        //public override VOID OnEnd()
        //{
        //    yield return WaitClickNpc(11);

        //    yield return SendDialog(12);

        //    if (Ret() == 0)
        //    {
        //        yield break;
        //    }

        //    yield return TakeItem(11);
        //    yield return GiveMoney(11);

        //}
    }
}
